package com.yh.threadTest.utils;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.net.URL;

/**
 * @ClassName WebDownloader
 * @Description TODO
 * @Author 0715-YuHao
 * @Date 2020/11/14 11:53
 */
public class WebDownloader {

    public static void downloader(String url, String name) {
        try {
            FileUtils.copyURLToFile(new URL(url), new File(name), 1000, 1000);
        } catch (IOException exception) {
            exception.printStackTrace();
        }
    }
}
